package com.steakliu.sun.demo.client;

import com.steakliu.sun.demo.api.UserService;
import com.steakliu.sun.demo.client.component.UserServiceComponent;
import com.steakliu.sun.demo.client.configuration.ClientConfiguration;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * 功能说明：
 * <p>
 * Original @Author: steakliu-刘牌, 2023-01-14  21:59
 * <p>
 * Copyright (C)2020-2022  steakliu All rights reserved.
 */
public class SpringAnnotationClientApplication {
    public static void main(String[] args) {
        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(ClientConfiguration.class);
        UserServiceComponent serviceComponent = context.getBean(UserServiceComponent.class);
        String user = serviceComponent.getUser("liu");
        System.out.println(user);
    }
}
